<?php

namespace App\Console\Commands;

use App\Helpers\AiFileUploadHelper;
use App\Models\AqFile;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;

class Test extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'app:test';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Command description';

    /**
     * Execute the console command.
     */
    public function handle()
    {
		$images = AqFile::whereIn('id',[20])->where('isimage',1)
		->selectRaw('filepath as path')->get()->each(function ($item) {
			$item->path = Storage::disk('public')->path($item->path);
		})->toArray();
		dd($images);
    }
}
